
import ajax from './ajax'
//请求登入
export const reqLogin=(username,password)=>ajax('/api/login',{username,password},"POST")
//请求注册
export const reqRegister=(userInfo)=>ajax('/api/register',userInfo,"POST")
//更新用户
export const reqUpadate=(info)=>ajax('/api/update',info,"POST")
//获取当前的user(根据cookie)
export const reqGetUser=()=>ajax('/api/user')
//5、获取用户列表
export const reqUserList=(type)=>ajax('/api/userlist',type)
//获取当前用户的聊天消息列表
export const reqChatList=()=>ajax('/api/msglist')
//7、 修改指定消息为已读
export const reqReadmsg=(from)=>ajax('/api/readmsg',{from},"POST")